﻿using Microsoft.EntityFrameworkCore;
using OIDCDemo.Questions;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;

namespace OIDCDemo.EntityFrameworkCore;

public class HostMigrationsDbContext : AbpDbContext<HostMigrationsDbContext>
{
    public HostMigrationsDbContext(DbContextOptions<HostMigrationsDbContext> options)
        : base(options)
    {

    }

    public DbSet<Question> Questions { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        modelBuilder.ConfigurePermissionManagement();
        modelBuilder.ConfigureSettingManagement();
        modelBuilder.ConfigureAuditLogging();
        modelBuilder.ConfigureBackgroundJobs();
        modelBuilder.ConfigureFeatureManagement();
    }
}
